package 设计模式.mediator;

import java.util.HashMap;
import java.util.Map;

/**
 * @功能
 * @创建时间 2020/5/4
 * 经理
 */
public class President implements Mediator {
    private Map<String,Department> map = new HashMap<String,Department>();
    @Override
    public void register(String dname, Department d) {
        map.put(dname,d);

    }

    @Override
    public void command(String dname) {
        map.get(dname).selfAction();

    }
}
